<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>天知道</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/tianindex.css" />
</head>

<body>
<div class="wrap" id="app">
    <div class="search_form">

        <div class="form_group">

            <button class="input_sub" @click="searchWeather">
                搜 索
            </button>
        </div>

    </div>
    <table width="300" border="1" cellpadding="0" cellspacing="0">
        <tr>
            <td>姓名</td>
            <td>学号</td>
        </tr>
        <tr v-for="item in students">
            <td>{{item.sname}}</td>
            <td>{{item.stuno}}</td>
        </tr>
    </table>
</div>
<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="../js/vue.js"></script>
<!-- 官网提供的 axios 在线地址 -->
<script src="../js/axios.min.js"></script>
<!-- 自己的js -->
<script>
    let app=new Vue({
        el:"#app",
        data:{
            city:"",
            studentVo:{},
            students:[],
        },
        methods:{
            searchWeather(){
                axios.post("http://localhost:8080/find/1/3",this.studentVo).then(result=>{
                    console.log(result)
                    this.students=result.data.data.records;
                })
            }
        }
    })
</script>



</body>
</html>
